package cn.stylefeng.guns.modular.business.frequency.userawardbase.mapper;

import cn.stylefeng.guns.modular.business.frequency.siterelation.entity.SiteRelation;
import cn.stylefeng.guns.modular.business.frequency.userawardbase.model.param.UserAwardBaseParam;
import cn.stylefeng.guns.modular.business.frequency.userawardbase.model.result.PkgUserAwardBase;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.business.frequency.userawardbase.entity.UserAwardBase;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 网点人员提成设置表 Mapper 接口
 *
 * @author yujie
 * @date 2023/05/09 17:15
 */
public interface UserAwardBaseMapper extends BaseMapper<UserAwardBase> {

    Page<SiteRelation> getPage(@Param("page") Page<Object> defaultPage, @Param("item") UserAwardBaseParam userAwardBaseParam);

    List<PkgUserAwardBase> getUserAwardBaseList(@Param("userIds") List<String> userIds,@Param("siteId") String siteId);

    List<UserAwardBase> getByUserIdAndTypeList(@Param("tenantId") Long userId);
    UserAwardBase getByUserIdAndType(@Param("tenantId") Long userId,@Param("cityCode") String cityCode);
}